
/*
* Copyright 2009, Center for Advanced Information Systems,Nanyang Technological University
*
* File name: GBlend.java
*
* Abstract: The main class of GBlend
*
* Current Version:      0.1
* Auther:               Jin Changjiu
* Modified Date:        Jun.16,2009
*
*/
package gblend;

import java.sql.SQLException;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
import org.openide.util.Exceptions;
import gblend.db.DbManager;

/**
 * The main class of the application.
 */
public class GBlendApp extends SingleFrameApplication {

    /**
     * At startup create and show the main frame of the application.
     */
    @Override protected void startup() {
        try {
            show(new GBlendView(this));
        } catch (SQLException ex) {
            Exceptions.printStackTrace(ex);
        }
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of PVGQApp
     */
    public static GBlendApp getApplication() {
        return Application.getInstance(GBlendApp.class);
    }
   
    public static DbManager getDbManager(){
        return DbManager.getInstance();
    }
    /**
     * Main method launching the application.
     */
    public static void main(String[] args) {
        launch(GBlendApp.class, args);
    }
}
